1. Field of the Invention
The present invention relates to a device for generating a robot program and also relates to a device for analyzing a robot program. More particularly, the present invention relates to a robot program generating device for generating a robot program useful for effectively raising a production system in which a robot and visual sensor are used or for generating a robot program useful for maintaining the production system after it has been raised. The present invention also relates to a robot program analyzing device for analyzing the robot program.
2. Description of the Related Art
There has already been provided a production system including a process in which a fixed camera or a movable camera mounted on a robot is used as an image snapping means for a visual sensor together with a robot and in which a large number of parts, which are not arranged in order, are successively taken out and conveyed to the next process. This production system has already been put into practical use under appropriately determined conditions. This robot-visual sensor system for handling a large number of parts, which are not arranged in order, is going to enter into a practical phase from a trial phase recently so as to spread into various applications. For example, as disclosed in the Japanese Unexamined Patent Publication No. 2003-34430, the operation of a system, the practical use of which has been conventionally assumed to be difficult, has now started.
However, in the case of the above application in which the visual sensor is used, it is necessary to select a measuring position and measuring method conducted by a visual sensor while consideration is being given to the object of the work to be done and the size and shape of a workpiece to be handled. Therefore, a heavy burden is imposed on the operator. For example, assume a case in which a visual sensor is used, the measurement accuracy represented by the visual angle range of which is 0.5°, in order to grip both end portions of a work of 2 m long by a robot hand. In the case where both end portions of the work are gripped by the robot hand after only one end portion of the work has been measured using the visual sensor, the measuring accuracy of which is 0.5°, a gripping error at the other end portion is not less than 17 mm (2000 mm×2×π×0.5/360). Accordingly, the selection of the above measuring point and measuring method is not appropriate unless a handling mechanism capable of absorbing the above error is used. In this case, it is necessary to conduct a measurement on the other end portion of the work so as to reduce the error caused in the measurement.
In the case where it is impossible to ensure the detection accuracy since a difference between individuals of the shape of the characteristic portion to be used as the measurement portion is large, it is necessary that the characteristic portion is excluded from the measuring portion and that another characteristic portion is determined as the measuring portion.
In order to appropriately determine the measuring portion or the measuring method, it is necessary to consider a large number of conditions such as a size, shape and fluctuation of the work and an accuracy of the visual sensor and a characteristic of the handling mechanism. However, it is an actual condition that the repetition of trial and error has been needed in the job site up to this time, in order to raise the system. In the case where the system has been raised by a user without accurately understanding these necessary conditions and a relation between the measuring portion and measuring method, even if the system is fortunately, excellently operated at first, trouble may be caused after that, for example, the system is stopped once a day, and it is difficult to specify the cause of the trouble. This problem becomes a heavy burden for the user, which becomes a cause of obstructing the introduction of the visual sensor robot system.
It is an object of the present invention to provide a robot program generating device capable of solving the above problems of the prior art. It is also an object of the present invention to provide a robot program analyzing device capable of analyzing the generated robot program. That is, it is an object of the present invention to reduce a burden imposed on a user in such a manner that know-how to use a visual sensor is incorporated into a device, which is capable of generating or analyzing a teaching program of a robot, such as a robot simulator, and a proposal and judgment can be made with respect to a work size, measuring position, measuring condition and correcting method etc.